#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date    : 2017-06-21 10:59:40
# @Author  : mh

import orm, asyncio
from models import User, Blog, Comment


async def test(loop):
	await orm.create_pool(loop=loop, user='www-data', password='www-data', db='awesome')
	u = User(name='Test', email='yuyuyuyu@example.com', passwd='1234567890', image='about:blank')
	await u.save()
	await orm.destory_pool()


loop = asyncio.get_event_loop()
loop.run_until_complete(test(loop))
loop.close()
